{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "initial_id",
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": "import torch"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "input=[3,4,5,6,\n",
    "       2,4,6,8,\n",
    "       1,6,7,8,\n",
    "       9,7,4,6]\n",
    "input=torch.Tensor(input).view(1,1,4,4)"
   ],
   "id": "b1a1cb3040c2a662"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "maxpooling_layer=torch.nn.MaxPool2d(kernel_size=2)",
   "id": "2dcc666e7bc21518"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "output=maxpooling_layer(input)\n",
    "print(output)"
   ],
   "id": "85922df0f05d7f91"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
